//
//  MYDynamicDetailsBottonView.swift
//  MuYing
//
//  Created by tbb on 2019/7/24.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class MYDynamicDetailsBottonView: UIView {

    @objc @IBOutlet weak var callBtn: QMUIButton!
    @objc @IBOutlet weak var likeBtn: QMUIButton!
    @objc @IBOutlet weak var commentBtn: QMUIButton!
    
    override func layoutSubviews() {
        super.layoutSubviews();
        self.callBtn.imagePosition = .top;
        self.callBtn.spacingBetweenImageAndTitle = 4;
        
        self.likeBtn.imagePosition = .top;
        self.likeBtn.spacingBetweenImageAndTitle = 4;
        
        self.commentBtn.imagePosition = .top;
        self.commentBtn.spacingBetweenImageAndTitle = 4;
        
        self.callBtn.setImage(UIImage(named: "common_call_icon"), for: .normal);
        self.callBtn.setImage(UIImage(named: "common_call_s_icon"), for: .selected);
        
        self.likeBtn.setImage(UIImage(named: "common_like_icon"), for: .normal);
        self.likeBtn.setImage(UIImage(named: "common_like_s_icon"), for: .selected);
        self.commentBtn.setImage(UIImage(named: "common_comment_icon"), for: .normal);
        
        self.callBtn.titleLabel?.font = UIFont.systemFont(ofSize: 10, weight: .medium);
        self.likeBtn.titleLabel?.font = UIFont.systemFont(ofSize: 10, weight: .medium);
        self.commentBtn.titleLabel?.font = UIFont.systemFont(ofSize: 10, weight: .medium);
        
        self.callBtn.setTitleColor(UIColorFromHex(rgbValue: 0xA0A0A0), for: .normal);
        self.likeBtn.setTitleColor(UIColorFromHex(rgbValue: 0xA0A0A0), for: .normal);
        self.commentBtn.setTitleColor(UIColorFromHex(rgbValue: 0xA0A0A0), for: .normal);
        
//        self.callBtn.setTitle(kYQLSSwift("点赞")+" 0", for: .normal);
//        self.likeBtn.setTitle(kYQLSSwift("收藏")+" 0", for: .normal);
//        self.commentBtn.setTitle(kYQLSSwift("评论")+" 0", for: .normal);
    }
}
